﻿#if UNITY_EDITOR
using System.Collections.Generic;
using System.IO;
/// <summary>
/// SpriteAtlas图集逻辑代码
/// </summary>
public partial class ESF_Logic
{
    /// <summary>
    /// SpriteAtlas设定
    /// </summary>
    public static ESF_BuildXmlAsset_CacheXmlCatalog<ESF_Xml_SpriteAtlasSetting> spriteAtlasSettingFolder { get { return GetCacheXmlCatalog<ESF_Xml_SpriteAtlasSetting>(ESF_enCacheXmlCatalog.SpriteAtlas); } }
    
    #region CollectSprite 收集Sprite
    /// <summary>
    /// 收集Sprite
    /// </summary>
    /// <typeparam name="T">泛型</typeparam>
    /// <returns>Sprite节点</returns>
    public static List<T> CollectSprite<T>()
        where T : ESF_CollectAsset_Sprite
    {
        return ESF_Utility.CollectFile<T>(spriteAtlasSettingFolder.xml.spriteAtlasRoots, enESF_AssetFilterClassify.Sprite, enESF_DependencyClassify.UnClude, enESF_DisplayProgressBarClassify.Normal);
    }
    #endregion

    #region CollectSpriteAtlas 收集SpriteAtlas
    /// <summary>
    /// 收集SpriteAtlass
    /// </summary>
    /// <typeparam name="T">泛型</typeparam>
    /// <param name="_searchFolders">搜索文件夹</param>
    /// <returns>SpriteAtlas节点</returns>
    public static List<T> CollectSpriteAtlas<T>(string[] _searchFolders)
        where T : ESF_CollectAsset
    {
        return ESF_Utility.CollectFile<T>(_searchFolders, enESF_AssetFilterClassify.SpriteAtlas, enESF_DependencyClassify.UnClude, enESF_DisplayProgressBarClassify.Normal);
    }
    #endregion

    #region CollectSpriteAtlasAssetbundle 收集SpriteAtlas的AssetBundle
    /// <summary>
    /// 收集SpriteAtlas的AssetBundle
    /// </summary>
    /// <typeparam name="T">泛型</typeparam>
    /// <param name="_searchFolders">搜索文件夹</param>
    /// <returns>SpriteAtlas节点</returns>
    public static List<T> CollectSpriteAtlasAssetbundle<T>(string[] _searchFolders)
        where T : ESF_CollectAsset_AssetBundle
    {
        return ESF_Utility.CollectFile<T>(_searchFolders, enESF_AssetFilterClassify.SpriteAtlas, enESF_DependencyClassify.UnClude, enESF_DisplayProgressBarClassify.Normal);
    }
    #endregion

    #region 收集生成SpriteAtlas的文件夹
    /// <summary>
    /// 收集生成SpriteAtlas的文件夹
    /// </summary>
    /// <returns>要生成SpriteAtlas的文件夹</returns>
    public static List<ESF_BuildSpriteAtlasFolder> CollectBuildSpriteAtlasFolders()
    {
        List<ESF_BuildSpriteAtlasFolder> folders = new List<ESF_BuildSpriteAtlasFolder>();
       
        return folders;
    }
    #endregion
}
#endif